start on starting <%= app %>-<%= name %>
stop on stopping <%= app %>-<%= name %>
respawn
respawn limit 50 5

exec su - <%= user %> -c 'cd <%= engine.root %>; export PORT=<%= port %>;<% engine.env.each_pair do |var,env| %> export <%= var.upcase %>='\''<%= env %>'\''; <% end %> export TMPDIR=$TMPDIR/<%= app %>/<%= name %>/<%= num %>; rm -rf $TMPDIR; mkdir -p $TMPDIR; source $VENV/bin/activate; <%= process.command %> >> <%= log %>/<%=name%>-<%=num%>.log 2>&1'
